package cn.laiguowei.May3.MD5Signature.service;

import cn.laiguowei.May3.MD5Signature.bean.KeySecurity;
import cn.laiguowei.May3.MD5Signature.dao.KeySecurityRepository;
import cn.laiguowei.May3.MD5Signature.service.inter.IKeySecurityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class KeySecurityService implements IKeySecurityService<KeySecurity> {

    @Autowired
    KeySecurityRepository keySecurityRepository;

    @Override
    public KeySecurity save(KeySecurity keySecurity) {
        return keySecurityRepository.save(keySecurity);
    }

    @Override
    public KeySecurity getKeySecurityByidentityId(String identityId) {
        return keySecurityRepository.findByIdentityId(identityId);
    }
}
